package com.yuanfeng.goods.feign;


import com.yuanfeng.commoms.dto.goods.ShopListQueryDTO;
import com.yuanfeng.commoms.dto.shop.ArticleShopDTO;
import com.yuanfeng.commoms.dto.shop.MerchantShopNavQueryDTO;
import com.yuanfeng.commoms.dto.shop.WebShopListQueryEsDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.commoms.vo.shop.GdsShopDetailResultVO;
import com.yuanfeng.commoms.vo.shop.InvoiceSwitchEntityVO;
import com.yuanfeng.commoms.vo.shop.TransportTemplateVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


@FeignClient(name = "mall-business", url = "http://localhost:8087")
public interface BusinessServiceClient {

    @GetMapping("/shopBase/info/selectAllShop")
    List<ArticleShopDTO> selectAllShop();

    @GetMapping("/shopBase/info/selectByShopId")
    WebShopListQueryEsDTO selectByShopId2(@RequestParam("shopId") Integer shopId);

    @GetMapping("/shop/nav/selectShopNav")
    List<MerchantShopNavQueryDTO> selectShopNav(@RequestParam("shopId") Integer shopId);

    @GetMapping("/shopBase/info/selectByH5ShopId")
    ShopListQueryDTO selectByH5ShopId(@RequestParam("shopId") Integer shopId);

    /**
     * 查询店铺的发票状态
     */
    @PostMapping("shopBase/info/queryShopInvoiceSwitch")
    public InvoiceSwitchEntityVO queryShopInvoiceSwitch(@RequestBody Map<String, Object> paramTmp);

    /**
     * 根据shopid 查询店铺信息
     */
    @PostMapping("shopBase/info/queryShopInfo")
     GdsShopDetailResultVO queryShopinfoByShopId(@RequestParam("shopId") Integer shopId);

    @PostMapping("/shop/gate/queryUserIsGate")
     Integer queryUserIsGate(@RequestBody Map<String,String> map);

    /**
     * 根据shopId查找店铺首页
     *
     * @param shopId
     * @return
     */
    @GetMapping("/shopBase/info/shopIndex")
    ResponseResult shopIndex(@RequestParam("shopId") Integer shopId);


    /**
     * 查询商家运费模板
     *
     * @param transportTemplate
     * @return
     */
    @GetMapping("/shop/transportTemplate/selectTemplateById")
    ResponseResult selectTemplateById(@RequestParam("transportTemplate") Integer transportTemplate);


    /**
     * 查询商家售卖区域
     *
     * @param transportAreaId
     * @return
     */
    @GetMapping("/shop/transportArea/selectAreaById")
    ResponseResult selectAreaById(@RequestParam("transportAreaId") Integer transportAreaId);

    /**
     * 删除绑定的入驻分类
     *
     * @param productClassId
     * @return
     */
    @GetMapping("/shop/classBind/deleteBindGoodsCat")
    ResponseResult deleteBindGoodsCat(@RequestParam("productClassId") Integer productClassId);


    /**
     * 根据shopId查询商家运费模板
     *
     * @param shopId
     * @return
     */
    @GetMapping("shop/transportTemplate/selectByShopId")
    List<TransportTemplateVO> selectByShopId(@RequestParam("shopId") Integer shopId);

    /**
     * 店铺评分
     * @param map
     * @return
     */
    @PostMapping("/shop/avgEvaluation/shopScore")
    ResponseResult shopScore(@RequestBody Map<Object, Object> map);


    /**
     * 删除申请的经营类目记录
     * @param catId
     * @return
     */
    @GetMapping("/shop/classBindTmp/deleteClassBindTmp")
    ResponseResult deleteClassBindTmp(@RequestParam("catId") Integer catId);
}
